package com.rpay.service.user;

import com.github.pagehelper.PageInfo;
import com.rpay.common.dto.user.TxResponseDTO;
import com.rpay.common.dto.user.UserTradeDTO;
import com.rpay.common.dto.wallet.WalletDTO;
import com.rpay.model.user.UserTradeDO;
import org.apache.ibatis.session.RowBounds;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface IUserTradeService {
//    List<NewsDTO> getNewsList(String newsType);

    PageInfo<Map> getDataList(Map map, RowBounds rowBounds);

    PageInfo<Map> getSelfTrades(Map map, RowBounds rowBounds);

    List<UserTradeDO> getTradesByExecTime();

    boolean saveUserTrade(UserTradeDTO userTradeDTO);

    boolean investConfirm(int tradeId);

    void withdraw(UserTradeDTO userTradeDTO, String rate);

    boolean manualWithDrawConfirm(int tradeId);

    boolean withdrawConfirm(int tradeId, int walletId);

    void conversion(UserTradeDTO userTradeDTO);

    boolean conversionConfirm(int tradeId);

    void transfer(int userId, int destUserId, String amount);

    BigDecimal getRate();
}
